extends layout/navbar

block link
    link(rel='stylesheet', href='/vendor/bootstrap-3.3.7/bootstrap.min.css')
    link(rel='stylesheet', href='/vendor/bootstrap-notify/animate.css')
    link(rel='stylesheet', href='/css/manageReservation.css')

block content

    - user = typeof(user) != 'undefined' ? user : { }
    input(type='hidden', value= user)#user


    div#reservation-container
        div.row
            section.content
                h1 预约列表
                div.col-md-8.col-md-offset-2
                    div.panel.panel-default
                        div.panel-body
                            div.pull-right
                                div.btn-group
                                    button#btn-finished.btn.btn-primary.btn-filter(type='button', data-target='finished') 已结束
                                    button.btn.btn-success.btn-filter(type='button', data-target='success') 申请成功
                                    button.btn.btn-warning.btn-filter(type='button', data-target='loading') 申请中
                                    button.btn.btn-danger.btn-filter(type='button', data-target='failed') 申请失败
                                    button#btn-canceled.btn.btn-danger.btn-filter(type='button', data-target='canceled') 已取消
                                    button#btn-all.btn.btn-filter(type='button', data-target='all') 全部
                            .table-container
                                table#table-filter.table.table-filter
                                    tbody
                                        each item in list
                                            //tr#status(data-status='failed')
                                            tr(data-status=item.status).item-tr
                                                td
                                                    div#btn-container
                                                        button(role=item.id, data-target=item.user_id, status=item.status).remove-reservation.btn.btn-primary.pull-right    删除
                                                        button(role=item.id, data-target=item.user_id, status=item.status).refuse-reservation.btn.btn-primary.pull-right    拒绝
                                                        button(role=item.id, data-target=item.user_id, status=item.status).accpet-reservation.btn.btn-primary.pull-right    同意
                                                        button(role=item.id).show-reservation.btn.btn-primary.pull-right    查看

                                                    h4(class=item.status)#status-text.title
                                                        | !{item.msg}

                                                    //span#start-end.media-meta.pull-right Febrero 13, 2016 - Febrero 13, 2016
                                                    p#inc-info 企业/团队名称: #{item.inc_name} &emsp;&emsp; 联系人手机: #{item.contact_phone}
                                                    p#reservation-info.title.summary 预约说明: #{item.title}
                                                        span.start-end.media-meta.pull-right !{item.startEnd}
                                                    //p#title.summary 科技部申请第一会议室
    include modals/alert
    include modals/user-msg

block scripts
    //script(src='/vendor/moment.min.js')
    script(src='/vendor/jquery-3.1.1/jquery-3.1.1.min.js')
    script(src='/vendor/bootstrap-3.3.7/bootstrap.min.js')
    script(src='/vendor/bootstrap-notify/bootstrap-notify.js')
    script(src='/vendor/bootbox.min.js')
    script(src='/js/views/myNotify.js')
    script(src='/js/views/EmailSuggestions.js')
    script(src='/js/views/manageReservation.js')